package storage.sql;

/**
 * The SimpleDB version of the java.sql.Statement interface.
 * This interface implements a subset of the methods in that
 * interface. 
 * @author Edward Sciore
 */
public interface Statement {
	
	/**
	 * Executes the specified SQL query string,
	 * returning its result set.
	 * @param qry the SQL query string
	 * @return the result set created by executing that string
	 * @throws SQLException
	 */
	public ResultSet executeQuery(String qry) throws SQLException;
	
	/**
	 * Executes the specified SQL update command.
	 * Returns the number of records affected by the update.
	 * @param cmd the SQL update command string
	 * @return the number of affected records
	 * @throws SQLException
	 */
	public int executeUpdate(String cmd)      throws SQLException;
}

